<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" />
    <title>全员考评</title>
    <link href="/addons/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/addons/jquery-weui-build/css/weui.min.css">
    <link rel="stylesheet" href="/addons/jquery-weui-build/css/jquery-weui.css">
    <link rel="stylesheet" href="/css/system/main.css?v=2018050202">
</head>
<body ontouchstart>
<div class="full-assess">
    <div class="header-top">
        <h3><img src="../../images/system/all-list.png">全员考评</h3>
    </div>
    <div class="ul-content">
        @if(!empty($perf))
            @foreach($perf as $k=>$p)
                <div class="open-list">
                    <h3 class="list-title">{{$k}}<span class="icon-dirction"></span></h3>
                    <ul class="show-open">
                        @foreach($p as $pp)
                        <li class="clearfix">
                            <div class="f-left pull-left"><a href="{{url('/user/performance/detail?uid='.$pp->user_id)}}">{{getUserName($pp->user_id)}}</a></div>
                            <div class="progress progress-striped active">
                                <div class="progress-bar progress-bar-info" role="progressbar"
                                     @if($pp->total_ach_score > 0)
                                     data-num="{{$pp->totalscore+round($pp->achievement_score/$pp->total_ach_score*100,1)}}" aria-valuenow="{{$pp->totalscore+round($pp->achievement_score/$pp->total_ach_score*100,1)}}"
                                     @else
                                     data-num="{{$pp->totalscore}}" aria-valuenow="{{$pp->totalscore}}"
                                     @endif
                                     aria-valuemin="0" aria-valuemax="120">
                                </div>
                            </div>
                            <div class="f-right pull-left">
                                @if($pp->total_ach_score > 0)
                                    {{$pp->totalscore+round($pp->achievement_score/$pp->total_ach_score*100,1)}}
                                @else
                                    {{$pp->totalscore}}
                                @endif
                            </div>
                            <span class="num-six">60</span><span class="num-ten">100</span>
                        </li>
                        @endforeach
                    </ul>
                </div>
            @endforeach
        @endif
    </div>
</div>
<div class="show-hidden">
    <ul>
        <li><a href="{{url('/user/performance/detail')}}"><img src="../../images/system/user.png">我的考评</a></li>
        <li><a href="{{url('/user/performance/index')}}"><img src="../../images/system/all.png">全员考评</a></li>
        <li><a href="{{url('/user/performance/month')}}"><img src="../../images/system/message.png">月度意见</a></li>
    </ul>
</div>
<div class="reful-tabbar">
    <a href="javascript:void(0)" class="find-link tabbar-item active">
        <div class="img-div">
        </div>
        <p class="tabbar-label">考评</p>
    </a>
    <a href="{{url('/user/message')}}" class="message-center tabbar-item">
        <div class="img-div">
        </div>
        <p class="tabbar-label">消息中心</p>
    </a>
    <a href="{{url('/user/reward')}}" class="reward-punishment tabbar-item">
        <div class="img-div">
        </div>
        <p class="tabbar-label">奖励惩罚</p>
    </a>
    <a href="{{url('/user/setting')}}" class="set-up tabbar-item">
        <div class="img-div">
        </div>
        <p class="tabbar-label">设置</p>
    </a>
</div>
<script src="/js/jquery-2.1.4.min.js"></script>
<script src="/addons/jquery-weui-build/js/fastclick.js"></script>
<script>
    $(function() {
        document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + 'px';
        FastClick.attach(document.body);
    });
</script>
<script src="/addons/jquery-weui-build/js/jquery-weui.min.js"></script>
<script>
    $('.find-link').click(function () {
        $('.show-hidden').toggle();
    });
    $('.full-assess .ul-content .list-title').each(function () {
        $(this).click(function () {
            $(this).find('span').toggleClass('open');
            $(this).next('ul').toggle();
        })
    })
    $('.full-assess .open-list li').each(function () {
        $(this).find('.progress-bar').css('width', ($(this).find('.progress-bar').data('num')/120)*100+'%');
        if($(this).find('.progress-bar').data('num')<60){
            $(this).find('.progress-bar').css('background-color','#E86C64');
        }else if($(this).find('.progress-bar').data('num')>=60&&$(this).find('.progress-bar').data('num')<100){
            $(this).find('.progress-bar').css('background-color','#FFC876');
        }else if($(this).find('.progress-bar').data('num')>=100){
            $(this).find('.progress-bar').css('background-color','#BFD980');
        }
    });
</script>
</body>
</html>